<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp"/>
  <title>智慧购物平台</title>

  <meta name="keywords" content="">
  <meta name="description" content="">
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html"/>
  <![endif]-->

  <link href="css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
  <link href="css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
  <link href="css/animate.min.css" rel="stylesheet">
  <link href="css/style.min862f.css?v=4.1.0" rel="stylesheet">
</head>
<style>
  .roll-right.btn-back {
    right: 140px;
    width: 60px;
    height: 40px;
    outline: 0;
  }
</style>
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
  <div id="wrapper">
    <!--左侧导航开始-->
    <nav class="navbar-default navbar-static-side" role="navigation">
      <div class="nav-close"><i class="fa fa-times-circle"></i>
      </div>
      <div class="sidebar-collapse">
        <ul class="nav" id="side-menu">
          <li class="nav-header">
            <div id="dropdown" class="dropdown profile-element">
              <span><img alt="image" class="img-circle" src="img/profile_small.jpg"/></span>
              <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                <span class="clear">
                 <span class="block m-t-xs"><strong class="font-bold" id="name">你好</strong></span>
                 <span class="text-muted text-xs block">欢迎使用<b class="caret"></b></span>
               </span>
             </a>
             <ul id="dropdown-menu" class="dropdown-menu animated fadeInRight m-t-xs">
              <li><a class="J_menuItem" href="resetPsw.html">修改密码</a>
              </li>
              <!--<li><a class="J_menuItem" href="profile.html">个人中心</a>-->
                <!--</li>-->
                <li class="divider"></li>
                <li><a href="login.html">安全退出</a>
                </li>
              </ul>
            </div>
            <div class="logo-element">&nbsp
            </div>
          </li>
          <li>
            <a class="J_menuItem" href="productManage.html">
              <i class="fa fa-columns"></i>
              <span class="nav-label">商品管理</span>
            </a>
          </li>
          <li>
            <a class="J_menuItem" href="orderManage.html">
              <i class="fa fa-desktop"></i>
              <span class="nav-label">订单管理</span>
            </a>
          </li>
          <li>
            <a class="J_menuItem" href="resetPsw.html">
              <i class="fa fa-bar-chart-o"></i>
              <span class="nav-label">修改密码</span>
            </a>
          </li>
        </ul>
      </div>
    </nav>
    <!--左侧导航结束-->
    <!--右侧部分开始-->
    <div id="page-wrapper" class="gray-bg dashbard-1">
      <div class="row border-bottom">
        <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
          <div class="navbar-header"><a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i
            class="fa fa-bars"></i> </a>
            <h1 class="navbar-minimalize minimalize-styl-2 ">智慧购物后台管理</h1>
          </div>
        </nav>
      </div>
      <div class="row content-tabs">
        <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>
        </button>
        <nav class="page-tabs J_menuTabs">
          <div class="page-tabs-content">
            <a href="javascript:;" class="active J_menuTab">首页</a>
          </div>
        </nav>
        <button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i>
        </button>
        <button class="roll-nav roll-right btn-back backButton">
          <i class="fa fa-reply"> 返回</i>
        </button>
        <div class="btn-group roll-nav roll-right">
          <button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作<span class="caret"></span>

          </button>
          <ul role="menu" class="dropdown-menu dropdown-menu-right">
            <li class="J_tabShowActive"><a>定位当前选项卡</a>
            </li>
            <li class="divider"></li>
            <li class="J_tabCloseAll"><a>关闭全部选项卡</a>
            </li>
            <li class="J_tabCloseOther"><a>关闭其他选项卡</a>
            </li>
          </ul>
        </div>
        <a href="login.html" class="roll-nav roll-right J_tabExit"><i class="fa fa fa-sign-out"></i> 退出</a>
      </div>
      <div class="row J_mainContent" id="content-main">
        <iframe class="J_iframe" name="iframe0" width="100%" height="100%" frameborder="0" seamless></iframe>
      </div>
    </div>
    <!--右侧部分结束-->
  </div>
  <script src="lib/jquery.min.js?v=2.1.4"></script>
  <script src="lib/bootstrap.min.js?v=3.3.6"></script>
  <script src="lib/plugins/metisMenu/jquery.metisMenu.js"></script>
  <script src="lib/plugins/slimscroll/jquery.slimscroll.min.js"></script>
  <script src="lib/plugins/layer/layer.min.js"></script>
  <script src="lib/hplus.min.js?v=4.1.0"></script>
  <script type="text/javascript" src="lib/contabs.min.js"></script>
  <!-- <script src="js/mes/public/publicURL.js"></script> -->
  <script src="lib/plugins/pace/pace.min.js"></script>

  <script>

   // if(sessionStorage.getItem("roles")==null)
   //   window.location.href="login.html";
   // var name=sessionStorage.getItem("name");
   // $("#name").text(name);
   //         // //一级菜单权限
   //         //console.log(sessionStorage.getItem('roles'));
   //         var roles = sessionStorage.getItem("roles").split("+");
   //         var items = new Array();//有权限的菜单项
   //         for (var i = 0; i < roles.length; i++) {
   //          items.push(parseInt(roles[i].split(">")[0]))
   //        }
   //        var length = $("#side-menu").children().length ;
   //        for (var i = length; i > 0; i--) {
   //        if (items.indexOf(i) === -1) {//如果不在items里说明此菜单项没有权限应当删除
   //        $("#side-menu").children().eq(i).remove()//第一个菜单项为父元素的第二个子元素index为1
   //      }
   //    }

   //           //二级菜单权限

   //           // console.log(items);
   //           for (var i = 0; i < items.length; i++) {
   //    if ($("#side-menu").children().eq(i + 1).children().length > 1) {//有二级菜单的菜单项
   //      console.log(roles[i]);
   //      var subItem = roles[i].split(">")[1].split("^");
   //      //console.log("subItem");
   //      //console.log(subItem);
   //        var subItemIndex = new Array();//有权限二级菜单项的index
   //        for (var k = 0; k < subItem.length; k++) {//把有权限的index提取出来保存到数组里
   //          subItemIndex.push(parseInt(subItem[k].split("_")[0]))
   //        }
   //        //console.log(subItemIndex);
   //        for (var j = $("#side-menu").children().eq(i + 1).children("ul").children().length - 1; j >= 0; j--) {
   //          //console.log("j="+j);
            
   //            if (subItemIndex.indexOf(j + 1) == -1){//dom的index从0开始 数组index从1开始
   //              // console.log($("#side-menu").children());
   //              $("#side-menu").children().eq(i + 1).children("ul").children().eq(j).remove();
   //                 //移除没有查看权限的菜单项
   //               //console.log("移除成功");
   //             }else {
   //                // console.log("come in j="+j);
   //                // console.log(subItem[j]);
   //                // console.log($("#side-menu").children().eq(i + 1).children("ul"));
   //                var href = $("#side-menu").children().eq(i + 1).children("ul").children().eq(j).children().attr("href") +"?"+ window.btoa("roles="+subItem[j].split("_")[1]);
   //                $("#side-menu").children().eq(i + 1).children("ul").children().eq(j).children().attr("href", href)
   //              }
   //            }
   //          }
   //    else {//无二级菜单的菜单项
   //      var href=$("#side-menu").children().eq(i + 1).children().attr("href")+"?"+window.btoa("roles="+roles[i].split(">")[1].split("_")[1])
   //      $("#side-menu").children().eq(i + 1).children().attr("href",href)
   //    }
   //  }

   //  $("#dropdown-menu").children("li").children("a").click(function () {
   //    $("#dropdown").removeClass("open")
   //  })

  </script>
</body>
</html>

